fixed GDK_2BUTTON_PRESS bug.
authorLars Hamann <lars@gtk.org>
Sat, 19 Dec 1998 01:18:08 +0000 (01:18 +0000)
committerLars Hamann <lars@src.gnome.org>
Sat, 19 Dec 1998 01:18:08 +0000 (01:18 +0000)
Sat Dec 19 01:56:13 1998  Lars Hamann  <lars@gtk.org>

* gtk/gtkclist.c (gtk_clist_button_press): fixed GDK_2BUTTON_PRESS
  bug.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkclist.c

index 1150d0cfadeff8c6e80bd74599a6e8e051d6d872..f3f0936b681ca9b01f06873357c43d065457c6be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Dec 19 01:56:13 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (gtk_clist_button_press): fixed GDK_2BUTTON_PRESS
+       bug.
+
 Fri Dec 18 15:30:43 PST 1998 Manish Singh <yosh@gimp.org>
 
        * configure.in: add ja to ALL_LINGUAS
index 1150d0cfadeff8c6e80bd74599a6e8e051d6d872..f3f0936b681ca9b01f06873357c43d065457c6be 100644 (file)
@@ -1,3 +1,8 @@
+Sat Dec 19 01:56:13 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (gtk_clist_button_press): fixed GDK_2BUTTON_PRESS
+       bug.
+
 Fri Dec 18 15:30:43 PST 1998 Manish Singh <yosh@gimp.org>
 
        * configure.in: add ja to ALL_LINGUAS
index 1150d0cfadeff8c6e80bd74599a6e8e051d6d872..f3f0936b681ca9b01f06873357c43d065457c6be 100644 (file)
@@ -1,3 +1,8 @@
+Sat Dec 19 01:56:13 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (gtk_clist_button_press): fixed GDK_2BUTTON_PRESS
+       bug.
+
 Fri Dec 18 15:30:43 PST 1998 Manish Singh <yosh@gimp.org>
 
        * configure.in: add ja to ALL_LINGUAS
index 1150d0cfadeff8c6e80bd74599a6e8e051d6d872..f3f0936b681ca9b01f06873357c43d065457c6be 100644 (file)
@@ -1,3 +1,8 @@
+Sat Dec 19 01:56:13 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (gtk_clist_button_press): fixed GDK_2BUTTON_PRESS
+       bug.
+
 Fri Dec 18 15:30:43 PST 1998 Manish Singh <yosh@gimp.org>
 
        * configure.in: add ja to ALL_LINGUAS
index 1150d0cfadeff8c6e80bd74599a6e8e051d6d872..f3f0936b681ca9b01f06873357c43d065457c6be 100644 (file)
@@ -1,3 +1,8 @@
+Sat Dec 19 01:56:13 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (gtk_clist_button_press): fixed GDK_2BUTTON_PRESS
+       bug.
+
 Fri Dec 18 15:30:43 PST 1998 Manish Singh <yosh@gimp.org>
 
        * configure.in: add ja to ALL_LINGUAS
index 1150d0cfadeff8c6e80bd74599a6e8e051d6d872..f3f0936b681ca9b01f06873357c43d065457c6be 100644 (file)
@@ -1,3 +1,8 @@
+Sat Dec 19 01:56:13 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (gtk_clist_button_press): fixed GDK_2BUTTON_PRESS
+       bug.
+
 Fri Dec 18 15:30:43 PST 1998 Manish Singh <yosh@gimp.org>
 
        * configure.in: add ja to ALL_LINGUAS
index 1150d0cfadeff8c6e80bd74599a6e8e051d6d872..f3f0936b681ca9b01f06873357c43d065457c6be 100644 (file)
@@ -1,3 +1,8 @@
+Sat Dec 19 01:56:13 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (gtk_clist_button_press): fixed GDK_2BUTTON_PRESS
+       bug.
+
 Fri Dec 18 15:30:43 PST 1998 Manish Singh <yosh@gimp.org>
 
        * configure.in: add ja to ALL_LINGUAS
index 6b88a7abfd9ee789ab6f7d3bf45fed5a2def81b4..335714b6f71876e914c95e63eec549ccaf4eb83e 100644 (file)
@@ -4852,6 +4852,9 @@ gtk_clist_button_press (GtkWidget      *widget,
   /* selections on the list */
   if (event->window == clist->clist_window)
     {
+      if (clist->drag_button)
+       return FALSE;
+
       x = event->x;
       y = event->y;
 
@@ -4878,7 +4881,7 @@ gtk_clist_button_press (GtkWidget      *widget,
            }
          else
            {
-             if (clist->drag_button == 0)
+             if (clist->click_cell.row >= 0 || clist->click_cell.column >= 0)
                return FALSE;
 
              clist->click_cell.row = -1;
@@ -5001,7 +5004,6 @@ gtk_clist_button_press (GtkWidget      *widget,
                }
            }
        }
-
       return FALSE;
     }
 
@@ -5028,8 +5030,6 @@ gtk_clist_button_press (GtkWidget      *widget,
        if (GTK_CLIST_ADD_MODE(clist))
          gdk_gc_set_line_attributes (clist->xor_gc, 1, GDK_LINE_SOLID, 0, 0);
        draw_xor_line (clist);
-
-       return FALSE;
       }
   return FALSE;
 }
@@ -5081,7 +5081,7 @@ gtk_clist_button_release (GtkWidget      *widget,
       return FALSE;
     }
 
-  if (clist->drag_button)
+  if (clist->drag_button == event->button)
     {
       gint row;
       gint column;
@@ -5136,7 +5136,8 @@ gtk_clist_motion (GtkWidget      *widget,
   g_return_val_if_fail (GTK_IS_CLIST (widget), FALSE);
 
   clist = GTK_CLIST (widget);
-  if (!(gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (clist)))
+  if (!(gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (clist)) ||
+      !clist->drag_button)
     return FALSE;
 
   button_actions = clist->button_actions[clist->drag_button - 1];
@@ -5187,7 +5188,8 @@ gtk_clist_motion (GtkWidget      *widget,
   if (GTK_CLIST_REORDERABLE(clist) && button_actions & GTK_BUTTON_DRAGS)
     {
       /* delayed drag start */
-      if (clist->click_cell.row >= 0 && clist->click_cell.column >= 0 &&
+      if (event->window == clist->clist_window &&
+         clist->click_cell.row >= 0 && clist->click_cell.column >= 0 &&
          (y < 0 || y >= clist->clist_window_height ||
           x < 0 || x >= clist->clist_window_width  ||
           y < ROW_TOP_YPIXEL (clist, clist->click_cell.row) ||